package org.madao.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.madao.common.utils.PageUtils;
import org.madao.gulimall.member.entity.MemberEntity;
import org.madao.gulimall.member.exception.PhoneExistException;
import org.madao.gulimall.member.exception.UsernameExistException;
import org.madao.gulimall.member.to.MemberLoginTo;
import org.madao.gulimall.member.to.SocialUser;
import org.madao.gulimall.member.vo.MemberRegistVo;

import java.util.Map;

/**
 * 会员
 *
 * @author madao
 * @email 2051190945@qq.com
 * @date 2021-08-11 16:41:25
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo vo);

    void checkPhoneUnique(String phone) throws PhoneExistException;

    void checkUserNameUnique(String userName) throws UsernameExistException;

    MemberEntity login(MemberLoginTo to);

    MemberEntity login(SocialUser socialUser) throws Exception;

}

